package com.tianji.learning.service;

import com.tianji.learning.dto.SignResultVO;
import com.tianji.learning.entity.PointsBoardSeason;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.learning.enums.PointsRecordType;
import com.tianji.learning.vo.PointsBoardSeasonVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author author
 * @since 2023-06-01
 */
public interface IPointsBoardSeasonService extends IService<PointsBoardSeason> {
    /**
     * 签到功能接口
     * @return
     */
    SignResultVO addSignRecords();

    /**
     * 监听签到事件
     * @param userId
     * @param points
     * @param sign
     */
    void addPointsRecord(Long userId, Integer points, PointsRecordType sign);

    /**
     * 本月签到情况
     * @return
     */
    int[] getSignRecords();

    /**
     * 查询所有赛季
     * @return
     */
    List<PointsBoardSeasonVO> queryMyPointsBoardSeason();

    /**
     * 查询赛季id
     * @param time
     * @return
     */
    Integer querySeasonByTime(LocalDateTime time);
}
